package com.zzw.java.utils;

import lombok.Data;
/**
 * 分页对象
 *
 * @author XiaoJie
 * @date 2024/1/1 12:00
 */
@Data
public class Pages {

  /**
   * 页码
   */
  private Integer page;

  /**
   * 数量
   */
  private Integer size;


  /**
   * 起始页
   */
  private Long startRow;

  public Integer getPage() {
    return this.page == null || this.page == 0 ? 1 : this.page;
  }

  public Integer getSize() {
    return this.size == null || this.size == 0 ? 10 : this.size;
  }

  public Pages() {}

  public Pages(Integer thisPage, Integer thisSize) {
    this.page = thisPage;
    this.size = thisSize;
  }
}
